#include "test.h"
#include "../version.h"
#include <iostream>

#include "spdlog/cfg/env.h" // support for loading levels from the environment variable
#include "spdlog/fmt/ostr.h"// support for user defined types
#include "spdlog/spdlog.h"

void testPrint()
{
    try
    {
        std::cout << "Version:" << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_PATCH << "." << VERSION_BUILD << std::endl;
        // Log levels can be loaded from argv/env using "SPDLOG_LEVEL"
        //load_levels_example();

        spdlog::info("Welcome to spdlog version {}.{}.{}  !", SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR,
                     SPDLOG_VER_PATCH);
    }
    catch (const std::exception &)
    {
    }
}

void LogPrint(const std::string &str)
{
    try
    {

        spdlog::info("{}  !", str);
    }
    catch (const std::exception &)
    {
    }
}
